﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace GMS.BasicControls
{
    public partial class BackGroundControl : UserControl
    {
        public BackGroundControl()
        {
            InitializeComponent();
        }
        private string _info;
        public string InfoLabel
        {
            get { return _info; }
            set { _info = value; }
        }

        protected void closeLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            this.Parent.Controls.Remove(this);
        }

        private void BackGroundControl_Load(object sender, EventArgs e)
        {
            this.Focus();
        }

        private void BackGroundControl_Enter(object sender, EventArgs e)
        {
            if (this.Parent.Controls.Find(this.Name.ToString(), false).Length > 1)
                this.Parent.Controls.Remove(this);
        }
    }
}
